package com.leyou.order.service;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.openfeign.FeignClientsConfiguration;
import org.springframework.context.annotation.ComponentScan;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * @author zqq
 * @ClassName LeyouOrderApplication
 * @Description
 * @date 2020/3/4-20:44
 */
@SpringBootApplication
@EnableDiscoveryClient
@EnableCircuitBreaker  //开启hystrix熔断器
@ComponentScan(basePackages = {"com.leyou.*"})
@EnableFeignClients(basePackages = {"com.leyou.*.inter"},defaultConfiguration = FeignClientsConfiguration.class)
@MapperScan("com.leyou.order.service.mapper") // mapper接口的包扫描
public class LeyouOrderApplication {
    public static void main(String[] args) {
        SpringApplication.run(LeyouOrderApplication.class);
    }
}
